#include <tinyHal.h>
#include "RawIo.h"
#include "RawIo_Microsoft_SPOT_Hardware_AddressSpace.h"

using namespace Microsoft::SPOT::Hardware;

// This sample will expose the LCD display framebuffer
// as an AddressSpaceUInt16, which allows Managed applications
// direct access to the frame buffer.
// In this sample the framebuffer is 320x240x16
// This must be defined somewhere in the HAL.
// The display driver is a logical place for that.

extern void* const pFrameBuffer;

const AddressSpace::TableEntry AddressSpace::Spaces[] = {
//  |  Name        | Base address | Word Width | Word Length |
//  +--------------+--------------+------------+-------------+
    { "Framebuffer", pFrameBuffer , 16         , 320*240}
};
const size_t AddressSpace::NumSpaces = ARRAYSIZE_CONST_EXPR(AddressSpace::Spaces);
